package com.demo.resourcecode.c4;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
import com.demo.resourcecode.service.MessageService;

public class XmlBeanFactoryDemo {

	public static void main(String[] args) {
		BeanFactory bf = new XmlBeanFactory(new ClassPathResource("beanFactoryTest.xml"));

		User user = bf.getBean("testbean", User.class);
		System.out.println(user.getUserName());
		System.out.println(user.getEmail());
	}

}
